import http from "@/utils/http";

/**
 * 获取所有常用词库
 * @returns
 */
export function getAllSearch(baseUrl) {
  return http.get(`${baseUrl?baseUrl:""}/api/search/getAllSearch`);
}

/**
 * 获取所有常用符号
 * @returns
 */
export function getAllSearchSymbol(baseUrl) {
  return http.get(`${baseUrl?baseUrl:""}/api/search/getAllSearchSymbol`);
}

/**
 * 批量添加常用词库
 */
export function bulkCreateSearch(baseUrl,params) {
  return http.post(`${baseUrl?baseUrl:""}/api/search/bulkCreateSearch`, params);
}

/**
 * 拼音码搜索常用词库
 */
export function getSearchByCode(baseUrl,params) {
  let search = {
    search: params,
  };
  return http.post(`${baseUrl?baseUrl:""}/api/search/getSearchByCode`, search);
}
